import { useRoleStore } from "@/store/modules/useRoleStore";
import { createPinia } from 'pinia';
import { storeToRefs } from "pinia";


// 手动创建 Pinia 实例
const pinia = createPinia();

// 使用 store
const roleStore = useRoleStore(pinia);

const { role } = storeToRefs(roleStore);

export default {
  path: "/kepu",
  redirect: "/kepu/index",
  meta: {
    icon: "material-symbols:book-ribbon",
    title: "科普",
    // showLink: role.value == '0' ? false : true
    roles: ['0'],
  },
  children: [
    {
      path: "/kepu/wenzhang",
      name: "Wenzhang",
      component: () => import("@/views/kepu/wenzhang.vue"),
      meta: {
        title: "科普文章"
      }
    },
    {
      path: "/kepu/shipin",
      name: "Shipin",
      component: () => import("@/views/kepu/shipin.vue"),
      meta: {
        title: "科普视频"
      }
    }
  ]
} as RouteConfigsTable;
